package com.wmh.baseservice.operationaid.controller.store;

import com.wmh.baseservice.operationaid.pojo.vo.store.TbStoreCommitDataReqVO;
import com.wmh.baseservice.operationaid.service.TbStoreDataService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

import static com.wmh.baseservice.common.utils.returnbody.ReturnBody.success;

/**
 * @author 谢骏
 * @date 2023/7/5 11:34
 **/
@Validated
@RestController
@RequestMapping("public/store/tb")
@Api(tags = "店铺数据-淘宝系-公开接口(用于机器人请求)")
public class PublicTbStoreController {

    @Resource
    private TbStoreDataService tbStoreDataService;

    @ApiModelProperty(value = "提交店铺数据")
    @PostMapping("commit")
    public String commit(@Valid TbStoreCommitDataReqVO reqVO){
        tbStoreDataService.commit(reqVO);
        return success();
    }
}
